Skip to content

[6.x] Fix @param names that do not match the signatures - #15120

Merged
jasonvarga merged 2 commits into
statamic:6.xfrom
darkdi:fix/docblock-param-names
Aug 5, 2026
Merged

[6.x] Fix @param names that do not match the signatures#15120
jasonvarga merged 2 commits into
statamic:6.xfrom
darkdi:fix/docblock-param-names

Conversation

@darkdi

@darkdi darkdi commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #15119, which you merged earlier — this is the batch I mentioned there.

Twenty @param tags name an argument the method does not take. Each was opened and read against its signature before changing.

Renames the docblock did not follow

Where Documented Actual
src/Support/Arr.php:220 removeNullValues $array $data
src/Assets/AssetFolder.php:165 rename $filename $name
src/Assets/AssetContainer.php:529 warmPresets $presets $preset
src/Auth/File/User.php:140 setRememberToken $value $token
src/Console/Processes/Process.php:161 withoutLoggingErrors $callable $callback
src/Contracts/Forms/Submission.php:54 get $key $field
src/Contracts/Forms/Form.php:9 handle $name $handle
src/Contracts/View/Antlers/Parser.php:58 getVariable $data $context
src/Http/Controllers/GlideController.php:82 generateByAsset $ref $encoded
src/StaticCaching/Cachers/AbstractCacher.php:254 refreshUrl $path $url
src/Modifiers/CoreModifiers.php:1710 md5 $params $value
src/Http/Controllers/CP/Updater/UpdateProductController.php:16 show $slug $marketplaceProductSlug
src/Http/Controllers/CP/Updater/UpdateProductController.php:65 changelog $slug $marketplaceProductSlug

Tags for parameters that are not there at all

Where Documented Actual
src/Assets/Asset.php:1019 blueprint string|null $blueprint takes nothing
src/Console/Commands/MakeWidget.php:72 generateWidgetView $addon takes nothing; $addon comes from $this->argument('addon')
src/Contracts/Forms/Submission.php:71 delete $key takes nothing
src/CP/Navigation/NavBuilder.php:33 __construct $withHidden only $items
src/Imaging/GlideUrlBuilder.php:23 build $filename only $item, $params
src/Modifiers/CoreModifiers.php:2901 timestamp $params only $value

One that was short rather than wrong

src/Modifiers/CoreModifiers.php:1196 inArray documented a single $value while the method takes $haystack, $params, $context. Filled it in following contains() in the same file, which has the identical signature and a complete block.

No signature, call site, or behaviour is touched.

Left alone

src/CP/Navigation/NavItem.php:570 name(...$arguments) documents $name. It is variadic, so documenting what it actually accepts looks deliberate rather than stale — that one is your call, not mine.

darkdi added 2 commits August 5, 2026 05:34
Twenty entries across sixteen files name an argument the method does not
take: mostly renames the docblock did not follow, plus a few tags for
parameters that were removed, and one modifier documenting one argument
where three are taken.

Docblocks only.
@jasonvarga
jasonvarga enabled auto-merge (squash) August 5, 2026 03:17
@jasonvarga
jasonvarga merged commit 757ba35 into statamic:6.x Aug 5, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants